package com.settlement.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.settlement.system.common.result.PageResult;
import com.settlement.system.model.entity.SysImportLog;
import com.settlement.system.model.entity.SysPlatform;
import com.settlement.system.model.query.ImportLogPageQuery;
import com.settlement.system.model.query.PlatformPageQuery;
import com.settlement.system.service.SysImportLogService;
import com.settlement.system.service.SysPlatformService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 部门表 前端控制器
 * </p>
 *
 * @author huangrensen
 * @since 2023-10-12
 */
@RestController
@RequestMapping("/api/v1/importLog")
@RequiredArgsConstructor
public class SysImportLogController {

    private final SysImportLogService importLogService;
    @Operation(summary = "导入日志分页列表", security = {@SecurityRequirement(name = "Authorization")})
    @GetMapping("/page")
    public PageResult<SysImportLog> getStorePage(
            @ParameterObject ImportLogPageQuery queryParams
    ) {
        Page<SysImportLog> result = importLogService.getImportPage(queryParams);
        return PageResult.success(result);
    }
}
